Open Game & Lobby
This API allows external platforms to seamlessly launch the Poker client, including both the lobby and individual game tables. The session is created via an API request, and the response includes a special URL that can be used to open the Poker interface.
The lobby URL can be opened in various ways depending on the integration setup: in a new browser window, the current window, or an iframe. On mobile devices, opening it in a new window is recommended for proper display.
Authentication options
This method can be used in the following ways:
- With a valid request signature (if the client has a secret key);
- By a user with ROLE_ADMIN;
- By a user with permission to create an OpenGame session (CREATE, OpenGame).
Request URL
POST http(s)://API_URL/apiweb/v3/open-game?client={clientKey}
Request header (HTTP Header)
Parameter Name | Description | Optional / Mandatory |
---|---|---|
sign | Request signature. Can be mandatory if the client has a secret key; otherwise, it is optional. | Optional / Mandatory |
Content-Type | Request format. Supported: application/vnd.api+json | Mandatory |
accept | Response format. Supported: application/vnd.api+json | Optional |
Request parameters
Parameter Name | Description | Optional / Mandatory |
---|---|---|
session.id | External session ID. Generated automatically if not specified | Optional |
session.authType | Authorization type: internal, external. Default: external | Optional |
session.tableId | ID of the table to open the session for | Optional |
session.lang | Language ISO code | Optional |
session.launchOptions | Custom options embedded in the open session URL | Optional |
session.longLifeLoginToken | Whether to use a long-life login token. Default: true | Optional |
session.userIp | IP address of the player | Optional |
player.id | External player ID | Mandatory |
player.nick | Player’s nickname | Optional |
player.name | Player’s name | Optional |
player.email | Player’s email | Optional |
player.referralCode | Referral code of the referer | Optional |
player.bonusCode | Bonus code of the affiliate | Optional |
player.phoneNumber | Player’s phone number | Optional |
player.tag | Player’s tag | Optional |
player.active | Whether the account is activated. Default value may be configured | Optional |
player.verified | Whether the player is verified. Default value may be configured | Optional |
player.trustedLevel | ID of the trusted level | Optional |
player.preferredCurrency | Player’s preferred currency ISO code | Optional |
player.preferredCurrency | Player’s country ISO code (Note: appears duplicated in source) | Optional |
Possible launch options:
Option Name | Description |
---|---|
restoreSessionUrl | URL to your server. If the session expires in the HTML5 application, the player is redirected here for login. After login, a new session should be created, and the player should be redirected to the given URL. |
Here are the values for optional parameters required to open various parts of client application:
Poker lobby
authType = internal
orexternal
launchOptions = {...}
(optional)
Poker table
authType = internal
orexternal
tableId = [table ID]
launchOptions = {...}
(optional)
Request example
{
"data": {
"type": "OpenGame",
"attributes": {
"session": {
"id": "someSessionId",
"authType": "external",
"tableId": 10,
"lang": "en",
"userIp": "12.3.4.2",
"launchOptions": {
"customOption1": "value1",
"customOption2": "value2"
},
"longLifeLoginToken": true
},
"player": {
"id": "1",
"nick": "nick",
"preferredCurrency": "USD",
"email": "[email protected]"
}
}
}
}
Response parameters
Parameter Name | Description | Optional / Mandatory |
---|---|---|
playerId | External player ID | Mandatory |
sessionId | Generated or provided session ID | Mandatory |
auth | Authorization token | Mandatory |
url | URL to open the Poker lobby | Mandatory |
Response example
{
"data": {
"id": "/apiweb/v3/.well-known/genid/8208f4ffb5067d2fd251",
"type": "GameSession",
"attributes": {
"playerId": "9",
"sessionId": "EXTA35A74BB190D1C46392E32524AF7277C",
"auth": "EB2FAA7C1581DCF80D9FC2EB255FEB98",
"url": "https://evenbet.pokerserversoftware.com/html5/?auth=EB2FAA7C1581DCF80D9FC2EB255FEB98&lang=en"
}
}
}
Errors returned
HTTP Code | Message | Description |
---|---|---|
400 | Not valid request | Incorrect request signature |
422 | Auth type not valid | authType parameter value is given but it does not match any of the possible values |
Currency cannot be blank | Param 'currency' is required but was not sent. An error may occur only if param 'currency' was configured as mandatory. | |
Currency not found | Currency with ISO code sent was not found. An error may occur only if param 'currency' was configured as mandatory. | |
This currency is not active | Currency with ISO code sent is not active. An error may occur only if param 'currency' was configured as mandatory. | |
A Player with this username already exists in the system. | User with this nickname is already registered in the system | |
The maximum username length is X | Maximum length of nickName is exceeded |